<?php
include('inc_head.php');
if($wu->request_string('act')=='del' && request_int('id')){
	$db->delete('tusermember','ID='.$wu->request_int('id'));
	$wu->redirect('删除成功','member_list.php');
}
?>
<div style="margin:5px;"><a href="member_edit.php?tag=article">新增用户</a></div>
<table class="table table-hover table-bordered">
    <thead>
        <tr><th>序号</th><th>登录名</th><th>姓名</th><th>登录次数</th><th>注册时间</th><th>注册IP</th><th>操作</th></tr>
    </thead>
    <tbody>
	<?php
		$i=1;
		$rs=$db->fetch_all("select * from tusermember order by CreatedTime desc");
		if($rs){
			foreach($rs as $row){
				echo "<tr><td>$i</td><td>".$row['UserName']."</td><td>".$row['Name']."</td><td>".$row['LoginCount']."</td><td>".$row['CreatedTime']."</td><td>".$row['RegistIP']."</td><td><a href=\"member_edit.php?uid=".$row['UserName']."\">编辑</a> <a href=\"?act=del&id=".$row['ID']."\">删除</a></td></tr>";
				$i++;
			}
		}
	?>
    </tbody>
    <tfoot>
        <tr class="warning"><td colspan="7">-</td></tr>
    </tfoot>
</table>
<?php
	include('inc_foot.php');
?>
